This routine checks to see if a catalog was opened back in Setting Up ,
if there was then the translation will be fetched and returned to the calling
function.
1getcatstr:
2 parse arg msgno,msgstring
3 if catalog ~= 0 then
4 msgstring = getcatalogstr(catalog,msgno,msgstring)
5 do i = 3 to arg()
6 parse var msgstring fore '%s' aft
7 msgstring = fore||arg(i)||aft
8 end
9 return msgstring
Line:
1 Sub-routine label.
2 From the arguments passed to us, we get the message number used in
the catalog and the message text.
3 - 4 If a catalog was opened then we get the translated text using a
locale.library call.
5 - 8 Routine dodelete is the only routine that calls getcatstr with
more than three arguments any others will just fall through this bit.
We parse the string getting the text before and after the %s, then
format it substituting in arg(3) and arg(4) that were passed, (number
of files and directories).
9 Return the translated message text.
|